import Vue from "vue";
import VueRouter from "vue-router";


Vue.use(VueRouter);
const routes = [{
    path: "/",
    name: "register",
    meta: {
      title: "单位信息注册"
    },
    component: () =>
      import ("../views/register.vue")
  },
  {
    path: "/register/successful",
    name: "register-successful",
    meta: {
      title: "单位注册成功"
    },
    component: () =>
      import ("../views/registerSuccess.vue")
  },
  {
    path: "/login",
    name: "login",
    meta: {
      title: "单位登录"
    },
    component: () =>
      import ("../views/login.vue")
  },
  {
    path: "/login/successful",
    name: "login-successful",
    meta: {
      title: "单位登录成功"
    },
    component: () =>
      import ("../views/loginSuccess.vue")
  },
  {
    path: "/QrCode",
    name: "QrCode",
    meta: {
      title: "查看二维码"
    },
    component: () =>
      import ("../views/QrCode.vue")
  },
  {
    path: "/visitorRecord",
    name: "visitorRecord",
    meta: {
      title: "访客记录"
    },
    component: () =>
      import ("../views/visitorRecord.vue")
  },
  {
    path: "/visitorRegister",
    name: "visitorRegister",
    meta: {
      title: "访客登记"
    },
    component: () =>
      import ("../views/visitorRegister.vue")
  },
  {
    path: "/visitor/successful",
    name: "visitorSuccessful",
    meta: {
      title: "访客登记成功"
    },
    component: () =>
      import ("../views/visitorSuccessful.vue")
  },
  {
    path: "/repeteRegister",
    name: "repeteRegister",
    meta: {
      title: "访客登记"
    },
    component: () =>
      import ("../views/repeteRegister.vue")
  },
  {
    path: "/quit/successful",
    name: "quitSuccessful",
    meta: {
      title: "访客签退成功"
    },
    component: () =>
      import ("../views/quitSuccessful.vue")
  },

  {
    path: "/visitQrCodeTemplate",
    name: "visitQrCodeTemplate",
    meta: {
      title: "加载中..."
    },
    component: () =>
      import ("../views/visitQrCodeTemplate.vue")
  },

];

const router = new VueRouter({
  mode: 'history',
  routes
});

export default router;